package com.ruoyi.project.ledger.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.ledger.mapper.TbTransportWaybillLeaveCheckMapper;
import com.ruoyi.project.ledger.domain.TbTransportWaybillLeaveCheck;
import com.ruoyi.project.ledger.service.ITbTransportWaybillLeaveCheckService;

/**
 * 车辆出厂检查Service业务层处理
 * 
 * @author gwc
 * @date 2020-04-16
 */
@Service
public class TbTransportWaybillLeaveCheckServiceImpl implements ITbTransportWaybillLeaveCheckService 
{
    @Autowired
    private TbTransportWaybillLeaveCheckMapper tbTransportWaybillLeaveCheckMapper;

    /**
     * 查询车辆出厂检查
     * 
     * @param id 车辆出厂检查ID
     * @return 车辆出厂检查
     */
    @Override
    public TbTransportWaybillLeaveCheck selectTbTransportWaybillLeaveCheckById(Long id)
    {
        return tbTransportWaybillLeaveCheckMapper.selectTbTransportWaybillLeaveCheckById(id);
    }

    /**
     * 查询车辆出厂检查列表
     * 
     * @param tbTransportWaybillLeaveCheck 车辆出厂检查
     * @return 车辆出厂检查
     */
    @Override
    public List<TbTransportWaybillLeaveCheck> selectTbTransportWaybillLeaveCheckList(TbTransportWaybillLeaveCheck tbTransportWaybillLeaveCheck)
    {
        return tbTransportWaybillLeaveCheckMapper.selectTbTransportWaybillLeaveCheckList(tbTransportWaybillLeaveCheck);
    }

    /**
     * 新增车辆出厂检查
     * 
     * @param tbTransportWaybillLeaveCheck 车辆出厂检查
     * @return 结果
     */
    @Override
    public int insertTbTransportWaybillLeaveCheck(TbTransportWaybillLeaveCheck tbTransportWaybillLeaveCheck)
    {
        tbTransportWaybillLeaveCheck.setCreateTime(DateUtils.getNowDate());
        return tbTransportWaybillLeaveCheckMapper.insertTbTransportWaybillLeaveCheck(tbTransportWaybillLeaveCheck);
    }

    /**
     * 修改车辆出厂检查
     * 
     * @param tbTransportWaybillLeaveCheck 车辆出厂检查
     * @return 结果
     */
    @Override
    public int updateTbTransportWaybillLeaveCheck(TbTransportWaybillLeaveCheck tbTransportWaybillLeaveCheck)
    {
        tbTransportWaybillLeaveCheck.setUpdateTime(DateUtils.getNowDate());
        return tbTransportWaybillLeaveCheckMapper.updateTbTransportWaybillLeaveCheck(tbTransportWaybillLeaveCheck);
    }

    /**
     * 批量删除车辆出厂检查
     * 
     * @param ids 需要删除的车辆出厂检查ID
     * @return 结果
     */
    @Override
    public int deleteTbTransportWaybillLeaveCheckByIds(Long[] ids)
    {
        return tbTransportWaybillLeaveCheckMapper.deleteTbTransportWaybillLeaveCheckByIds(ids);
    }

    /**
     * 删除车辆出厂检查信息
     * 
     * @param id 车辆出厂检查ID
     * @return 结果
     */
    @Override
    public int deleteTbTransportWaybillLeaveCheckById(Long id)
    {
        return tbTransportWaybillLeaveCheckMapper.deleteTbTransportWaybillLeaveCheckById(id);
    }
}
